package com.daoeping.domain;

import javax.persistence.CascadeType;
import javax.persistence.Column;
import javax.persistence.Entity;
import javax.persistence.GeneratedValue;
import javax.persistence.Id;
import javax.persistence.OneToMany;
import javax.persistence.Table;

/**
 * Bsc_industry entity. @author MyEclipse Persistence Tools
 */
@Entity
@Table(name = "bsc_industry", catalog = "daoeping")
public class Bsc_industry implements java.io.Serializable {

	// Fields

	private Integer id;
	private String name;
	private Integer parentId;
	private Cop_companyinfo cop_companyinfo;
	private Bzn_jobdescription bzn_jobdescription;
	
	// Constructors

	/** default constructor */
	public Bsc_industry() {
	}


	/** minimal constructor */
	public Bsc_industry(String name) {
		this.name = name;
	}

	/** full constructor */
	public Bsc_industry(String name, Integer parentId,Bzn_jobdescription bzn_jobdescription) {
		this.name = name;
		this.parentId = parentId;
		this.bzn_jobdescription = bzn_jobdescription;	
	}

	// Property accessors
	@Id
	@GeneratedValue
	@Column(name = "id", unique = true, nullable = false)
	public Integer getId() {
		return this.id;
	}

	public void setId(Integer id) {
		this.id = id;
	}

	@Column(name = "name", nullable = false, length = 200)
	public String getName() {
		return this.name;
	}

	public void setName(String name) {
		this.name = name;
	}

	@Column(name = "parent_id")
	public Integer getParentId() {
		return this.parentId;
	}

	public void setParentId(Integer parentId) {
		this.parentId = parentId;
	}


	@OneToMany(cascade=CascadeType.ALL,mappedBy="Bsc_industry")
	public void setCop_companyinfo(Cop_companyinfo cop_companyinfo) {
		this.cop_companyinfo = cop_companyinfo;
	}
	
	@OneToMany(cascade=CascadeType.ALL,mappedBy="Bsc_industry")
	public void setBzn_jobdescription(Bzn_jobdescription bzn_jobdescription) {
		this.bzn_jobdescription = bzn_jobdescription;
	}
}